package step3;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class ServerPlus extends Thread {
	@Override
	public void run() {
		try {
			
            /********** Begin **********/
            //创建服务器端ServerSocket(ss)，指定端口号8000
			ServerSocket ss = new ServerSocket(8000);

            /**********  end  **********/
			Socket s = ss.accept();
			DataOutputStream dos = new DataOutputStream(s.getOutputStream());
			DataInputStream dis = new DataInputStream(s.getInputStream());
			ReceiveThread thread = new ReceiveThread(s, dos, dis);
			thread.start();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}